package com.base.component.aws.sqs;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface MqListener {

	/**
	 * 消息主题
	 * @return
	 */
    String topic();
    
    /**
     * 处理消息的Tag
     * @return
     */
    String tag() default "*";
    
    /**
     * Max Message Number
     */
    int maxNumberOfMessages() default 10;

    /**
     * Max wait timeout, default 5s.
     */
    int waitTimeSeconds() default 5;
    
    /**
     * 无消息时等待 3000ms
     * @return
     */
    int sleep() default 3000;
	
}
